#ifndef WSTEPTREE_H
#define WSTEPTREE_H

#include "nodo.h"
#include <QWidget>
#include <QTreeWidget>
#include <QPoint>

class WStepTree : public QWidget
{
    Q_OBJECT

private:

    bool menu;
    QList<QTreeWidgetItem*> makeTree(Nodo* n, QList<QTreeWidgetItem*> parent);

protected:
    //ridefinisco l'evento del mouse se seleziono il menu
    bool eventFilter(QObject *, QEvent *);

public:
    QTreeWidget *treeView; //pubblico per potergli assegnare lo slot del contextmenu
    WStepTree(int n);
    WStepTree(QTreeWidgetItem*);

signals:
    void subTree();
    void nodeInfo();


public slots:
    //steptree context menu
    void showContextMenu(const QPoint &);

    //steptree info shift,lunghezza/fattore
    void changeTreeInfo(QTreeWidgetItem*);


};

#endif // WSTEPTREE_H
